package com.aos.erp.manager.model.review;

import com.aos.erp.manager.enums.review.ExportFileType;
import com.aos.erp.manager.enums.review.ImportExportType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import jdk.nashorn.internal.ir.annotations.Ignore;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;


@Getter
@Setter
@TableName("t_export_record_detail")
public class ExportRecordDetail implements Serializable {
	private static final long serialVersionUID = 1L;

    @ApiModelProperty(hidden = true, value = "记录ID")
    @TableId(value = "id", type = IdType.INPUT)
    private long id;


    @ApiModelProperty(hidden = true, value = "导出记录ID")
    @TableField("record_id")
    private long recordId;


    @ApiModelProperty(hidden = true, value = "流水号： 年月日时分秒+3位数字序号")
    @TableField("serial_number")
    private String serialNumber;

    @ApiModelProperty(hidden = true, value = "学员姓名")
    @TableField("student_name")
    private String studentName;


    @ApiModelProperty(hidden = true, value = "证件号码")
    @TableField("id_no")
    private String idNo;


    @ApiModelProperty(hidden = true, value = "证件照类型：大图；小图")
    @TableField("id_photo_type")
    private String idPhotoType;


    @ApiModelProperty(hidden = true, value = "驾照类型")
    @TableField("driving_license_type")
    private String drivingLicenseType;


    @ApiModelProperty(hidden = true, value = "文件类型: 1为指纹；2为证件照；3为无纸化列表")
    @TableField("file_type")
    private ExportFileType fileType;

    @ApiModelProperty(hidden = true, value = "操作类型： 1为导出；2为导入")
    @TableField("opt_type")
    private ImportExportType optType = ImportExportType.exp;

    @ApiModelProperty(hidden = true, value = "导出时间")
    @TableField("export_time")
    private Date exportTime;

    @ApiModelProperty(hidden = true, value = "导入时间")
    @TableField("import_time")
    private Date importTime;

    @ApiModelProperty(hidden = true, value = "导出结果")
    @TableField(exist = false)
    private String result;

    public String getFileTypeName() {
        if(fileType == null) {
            return "";
        } else {
            return fileType.getDesc();
        }
    }
}
